home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / VGA-VUL5.ZIP / OUTLAW.TXT < prev    next >
Text File  |  1995-10-20  |  5KB  |  94 lines

  1.  
  2.       ┌───────────────────────────────────────────────────────────────╖
  3.       │■                                                            ■ ║
  4.       │                                                               ║
  5.       │  █████████░                   ██░                             ║
  6.       │  ██░    ██░ ██░   ██░ ██████░ ██░     ████████░ ██░     ██░   ║
  7.       │  ██░    ██░ ██░   ██░   ██░   ██░     ██░   ██░ ██░     ██░   ║
  8.       │  ██░    ██░ ██░   ██░   ██░   ██░     ████████░ ██░     ██░   ║
  9.       │  ██░    ██░ ██░   ██░   ██░   ██░     ██░   ██░ ██░ ██░ ██░   ║
  10.       │  █████████░ ████████░   ██░   ██████░ ██░   ██░  ███░ ███░    ║
  11.       │                                                               ║
  12.       │                        T ∙ R ∙ I ∙ A ∙ D                      ║
  13.       │■                                                            ■ ║
  14.       ╘═══════════════════════════════════════════════════════════════╝
  15.                                ╔══════════════╗
  16.                                ║ ∙ PRESENTS ∙ ║
  17.                                ╚══════════════╝
  18.  
  19.                          3D-Starfields In Turbo Pascal
  20. ───────────────────────────────────────────────────────────────────────────────
  21.  Code By      : Vulture                  Total Files  : 4
  22.  File Type    : 3d-stars source          Release Date : 20th of October '95
  23.  Difficulty   : Easy level               Filename     : VGA-VUL5.ARJ
  24. ───────────────────────────────────────────────────────────────────────────────
  25.  
  26.  Hey there! Vulture here typing this little textfile. Yeah, another Outlaw
  27.  Triad release has hit yar screen. I just found an old little program on
  28.  3d starfields floating around my harddisk somewhere. I coded it some time
  29.  ago and I thought "Well, what da heck... maybe somebody finds it usefull".
  30.  So here it is! A new Outlaw release flushed into space (3d space that is ;-)
  31.  
  32. ───────────────────────────────────────────────────────────────────────────────
  33.  
  34.  Well, I am aware that a 3d starfield is probably the most used routine in
  35.  da whole width demo-scene (after the scroller;-) so I am not about to
  36.  explain it here. Hey! If you really want to learn how to code gfx, study
  37.  this source. It really isn't very difficult. But what you must know are
  38.  the formulas needed to display a 3d starfield on yar screen. Here they are:
  39.  
  40.  NX := ((Stars.X shl 7) div Stars.Z) + Xoff;
  41.  NY := ((Stars.Y shl 7) div Stars.Z) + Yoff;
  42.  
  43.  A star is build up by 3 coordinates, namely X,Y and Z. In order to show
  44.  3d-points on the screen, you must to some calculations first. In this case
  45.  it's very simple.
  46.  To get the vga's X value, multiply the stars X value with 256 and then
  47.  divide it by it's Z value. Then add the Xoff, which is 160, to center it on
  48.  the screen. The vga Y value is calculated in the same matter. That's it!
  49.  The Stars.X is a random value between -160 and 160. The Stars.Y is a random
  50.  value between -100 and 100. The Z-value starts with 255.
  51.  Next, decrease the Z-value so the stars move towards the viewer. Or increase
  52.  it so they move away from the viewer. There, I explained it to ya after all!
  53.  
  54.  Next thing to do is make a program which shows not just one, but a variety
  55.  of 3d-stars. A single star does not create a starfield, now does it... ;-)
  56.  Take a look at the program to see how this can be done.
  57.  
  58. ───────────────────────────────────────────────────────────────────────────────
  59.  
  60.  Study the source and learn. But I've got one thing to say... I'm getting
  61.  pretty sick and tired of all those lamers stealing source-code and then
  62.  saying it's theirs (won't mention names...)! I mean, coders do not release
  63.  their stuff so others can take the credit for it. They release it so otha
  64.  people can learn from it and create demos/intros of their own. If you use
  65.  other peoples sourcecode, then say so and credit them. Best thing is to get
  66.  ideas from source-codes and code fcts yourselve.
  67.  
  68.  Btw, thanx to Denthor of Aphyxia for giving me a hint on these starfields.
  69.  
  70.  Well, that's it. Go and study the source and if you can, try to make some
  71.  improvements on it. This source really isn't a hot piece of code so... ;-)
  72.  
  73.  If ya wanna contact Outlaw for some reason, call Blue Nose Productions and
  74.  leave a message there. We are stated in the main menu!
  75.  
  76.  Ok, gotta dash now, bye...
  77.  
  78.              Vulture / Outlaw Triad
  79.  
  80. ───────────────────────────────────────────────────────────────────────────────
  81.                                 OUTLAW DISTROS
  82.  
  83.   ■     The Force     ■      ■   Blue Nose Prod  ■     ■     FireHouse     ■
  84.   ■ +31 (0)36-5346967 ■      ■ +31 (0)345-619401 ■     ■ +31 (0)528-274176 ■
  85.  
  86.                                 Open For More!
  87. ───────────────────────────────────────────────────────────────────────────────
  88.                                 OUTLAW GREETZ
  89.  
  90.   DemoLisher (back in business), Ash (nice releases), Kr'33 (keep da gfx
  91.   coming), Troop (coding a bbs together), Utter Chaos (at full speed),
  92.   Thunderhawk (fanatic as always), all contacts on internet (you know
  93.   who U R), and all otha (demo)groups around.... Bye!
  94. ───────────────────────────────────────────────────────────────────────────────